package cc.co.cutenimy.nimyexplore.jdbc;

import java.sql.Connection;
import java.sql.SQLException;

import cc.co.cutenimy.nimyexplore.jdbc.driver.DriverDescription;
import cc.co.cutenimy.nimyexplore.model.jdbc.ConnectionInstance;

/**
 * 
 * @author 234aini@gmail.com
 * 
 */
public interface ConnectionManager {

	/**
	 * 
	 * @param connectionInstance
	 *            throw IllegalArgumentException if connectionInstance is null.
	 * @return
	 * @throws ClassNotFoundException
	 * @throws IllegalAccessException
	 * @throws InstantiationException
	 * @throws SQLException
	 * @throws ConnectException
	 */
	public Connection get(final ConnectionInstance connectionInstance,
			final DriverDescription driverDescription) throws ConnectException;

	/**
	 * Close all the connections
	 */
	public void clear();
}
